const Sequelize = require('sequelize');
const sequelize = require('../libs/sequelize')

const User = require('./user')
const Search = sequelize.define('search', {
    id: {
        type: Sequelize.INTEGER,
        allowNull: true,
        primaryKey: true,
        autoIncrement: true
    },
    name: {
        type: Sequelize.STRING
    },
    userId: {
        type: Sequelize.INTEGER
    }
});

//Search.sync()

Search.belongsTo(User)

module.exports = Search